﻿<UserControl x:Class="Export.Ui.Pages.Login"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             DataContext="{Binding Path=Main, Source={StaticResource ViewModelLocator}}"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Style="{StaticResource ContentRoot}">
        <ScrollViewer>
            <StackPanel MinWidth="200">
                <TextBlock Text="Username" Style="{StaticResource Heading2}" Margin="12,4,12,0" />
                <TextBox Name="txtUserName" Width="245" HorizontalAlignment="Left" Text="{Binding LoginViewModel.Username, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Margin="12,4,12,0"/>
                <TextBlock Text="Password" Style="{StaticResource Heading2}" Margin="12,4,12,0"/>
                <PasswordBox Width="245" Name="txtPassword" Margin="12,4,12,0" HorizontalAlignment="Left" >
                    <PasswordBox.InputBindings>
                        <KeyBinding Key="Enter" Command="{Binding LoginViewModel.LoginCommand}" CommandParameter="{Binding ElementName=txtPassword}"></KeyBinding>
                    </PasswordBox.InputBindings>
                 </PasswordBox>
                <Button Width="70" HorizontalAlignment="Left" CommandParameter="{Binding ElementName=txtPassword}" Command="{Binding LoginViewModel.LoginCommand}" Content="Login" Height="27" Margin="12,8,12,4" Cursor="Hand" />
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
